

function getAppercetionBodyById(id) {

	if (document.getElementById("div" + id) != null) {
		$("#div" + id).remove();
	} else {
		$.post("/ICSS/appercetion", {
					action : "getBodyById",
					appercetionId : id
				}, function(data) {
					var div = document.createElement("div");
					div.innerHTML = data + "<div align='right'><a href='javascript:getAppercetionBodyById("+id+")'>↑收起全文↑<a></div>";
					div.id = "div" + id;
					div.className = "lazyBody";
					$("#date" + id).after(div);
				});
	}

}

function typeArgChange() {
	
	var type = $("select[name='type']").val();
	if(type == 'byDate') {
		$("input[name='typeArg']").bind('click',WdatePicker);
	} else if (type == 'byName') {
		$("input[name='typeArg']").unbind('click');
		$("input[name='typeArg']").attr('readOnly',false)
	}
}

$(function(){

	$("select[name='type']").change(typeArgChange);

});